package com.qiaofang.applet.service.property.service;

import com.qiaofang.applet.common.base.BaseService;
import com.qiaofang.applet.service.property.domain.SyncDataErrorLog;
import com.qiaofang.applet.service.property.service.dto.CountSynDataListDto;
import com.qiaofang.applet.service.property.service.dto.SyncDataLogQueryDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Date;
import java.util.List;

/**
 * @author QF2019
 */
public interface SyncDataLogService extends BaseService<SyncDataErrorLog, String> {

    /**
     * 同步日志列表查询
     * @param syncDataLogQueryDto
     * @param pageable
     * @return
     */
    Page<SyncDataErrorLog> findByParams(SyncDataLogQueryDto syncDataLogQueryDto, Pageable pageable);

    /**
     * 重新同步数据
     * @param id
     */
    void retrySyncData(String id);

    /**
     * 统计每天同步数据总量
     * @param updateTime
     * @return
     */
    List<CountSynDataListDto> countDailyData(Date updateTime);

    Page<SyncDataErrorLog> findByRetryIsTrue(int page, int size);

}
